/*    */ package com.cr.common.utils.security;
/*    */ 
/*    */ import java.security.Key;
/*    */ import java.security.NoSuchAlgorithmException;
/*    */ import javax.crypto.KeyGenerator;
/*    */ 
/*    */ public class CipherUtils {
/*    */   public static Key generateNewKey(int keyBitSize, String algorithmName) {
/*    */     KeyGenerator kg;
/*    */     try {
/* 26 */       kg = KeyGenerator.getInstance(algorithmName);
/* 28 */     } catch (NoSuchAlgorithmException e) {
/* 30 */       String msg = "Unable to acquire " + algorithmName + " algorithm.  This is required to function.";
/* 31 */       throw new IllegalStateException(msg, e);
/*    */     } 
/* 33 */     kg.init(keyBitSize);
/* 34 */     return kg.generateKey();
/*    */   }
/*    */ }


/* Location:              D:\tmp\creditorRights-admin\BOOT-INF\lib\creditorRights-common-4.7.0.jar!\com\cr\commo\\utils\security\CipherUtils.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */